<script setup>
import {ref} from 'vue'

const scoreList = ref([])

import  {getAllUser} from '@/util/score.js'
const getScoreList = async () => {
  const data = await getAllUser();
  scoreList.value = data;
  console.log(scoreList.value)
}

</script>

<template>
  <el-button @click="getScoreList" type="primary">获取成绩
  </el-button>

  <el-table :data="scoreList" style="width: 100%">
     <el-table-column prop="id" label="学号"></el-table-column>
     <el-table-column prop="courseName" label="课程名称"></el-table-column>
     <el-table-column prop="type" label="课程类型"></el-table-column>
     <el-table-column prop="grade" label="成绩"></el-table-column>
  </el-table>

</template>

<style scoped>

</style>
